# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kmousetool
pkgver=24.02.2
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/utilities/org.kde.kmousetool"
pkgdesc="A program that clicks the mouse for you"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kdbusaddons-dev
	kdoctools-dev
	ki18n-dev
	kiconthemes-dev
	knotifications-dev
	kstatusnotifieritem-dev
	kxmlgui-dev
	libxt-dev
	libxtst-dev
	phonon-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/accessibility/kmousetool.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kmousetool-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
ec1168aad81c4fa2a42232146131c8823283c4f138d438df60bc1a1e130a48c8c9e23949c1e0781fd1d6b37ee43c57dd90891cbdfaf74af30778047fb412e057  kmousetool-24.02.2.tar.xz
"
